import type { RouteRecordRaw } from 'vue-router'

function Layout() {
  return import('@/layouts/index.vue')
}

const routes: RouteRecordRaw[] = [
  {
    path: '',
    component: Layout,
    children: [
      // 首页
      {
        path: '',
        component: () => import('@/views/index.vue'),
        meta: {
          title: '网站首页',
        },
      },
      // 公司介绍
      {
        path: 'company',
        component: () => import('@/views/company.vue'),
        meta: {
          title: '公司介绍',
        },
      },
    ],
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login.vue'),
    meta: {
      title: '登录',
    },
  },
]

export default routes
